# link object files
OBJ = timer_main.o dlist.o timer_create.o base_log.o log.o

#complie options
CFLAGS = $(DEBUG) -std=c++11

#rules
timer:$(OBJ)
	g++ $(CFLAGS) -o timerd $(OBJ) -lpthread

timer_main.o:dlist.h base_type.h
	g++ $(CFLAGS) -c timer_main.cpp

dlist.o:dlist.h
	g++ $(CFLAGS) -c dlist.cpp

timer_create.o:timer_create.h
	g++ $(CFLAGS) -c timer_create.cpp

base_log.o:base_log.h
	g++ $(CFLAGS) -c base_log.cpp

log.o:log.h
	g++ $(CFLAGS) -c log.cpp

.PYONY:clean
clean:
	rm -f *.o